function reduceMap(arr, fun) {
  let result = arr.reduce((prev, next, i) => {
    console.log(prev, next,i);
    prev[i] = fun(next);
    return prev;
  }, []); 
  console.log(result === arr)
}

reduceMap([1,2,3], function(cur) {
  return cur * 10;
})